﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterNhanSuTienLuong.Master" Inherits="System.Web.Mvc.ViewPage<DTTB.MV2.QUANLYNHANSUTIENLUONG.Models.FormBean.DanhMuc.PCDienThoaiForm>" %>
<%@ Import Namespace="DTTB.MV2.QUANLYNHANSUTIENLUONG.Models.LinQ.DanhMuc" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript" language="javascript" src="<%= ResolveUrl("~/Content/Scripts/DanhMuc/PCDienThoai.js") %>"></script>
    
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#PCDienThoaiSearch").focus();
            selectMenu("DanhMucChung-DienThoai");
            $("#DanhMucChung-DienThoai").parent().attr("class", "expanded");

        });
    </script>

    <form id="form" method="post" action="#" class="formBox">

    <input type="hidden" id="Id" name="Id" value="<%=Model.id %>" />
    <%=Html.Hidden("PageNumber", Model.Pagenumber)%>
    

    <div class="box">
    <div class="breadcrumbs">
          <ul>
            <li class="home"><a href="">Quản lý Danh mục</a></li>
            <li><a href="">Danh mục Phụ cấp điện thoại </a></li>
            <li>Page</li>
          </ul>
        </div>
           <div class="headlines">
            <h2>
                <span>Danh mục Phụ cấp điện thoại</span>
            </h2>
               <%-- <a class="show-filter" href="#">show filter</a>--%>
        </div>
    
        <table class="table_outsite" width="100%">
            <tr>
                <td>
            <%--Thông Báo--%>
            <%
                if (!string.IsNullOrEmpty(Model.MessageCreatePCDienThoai))
                {
            %>
            <div id="MessageCreatePCDienThoai" style="font-size: 12px; color: Blue; font-weight: bold"><%=Model.MessageCreatePCDienThoai%></div>
            <%
                }
            %>
            <%
                if (!string.IsNullOrEmpty(Model.Message))
                {
            %>
            <div id="Message" style="font-size: 12px; color: Blue; font-weight: bold"><%=Model.Message%></div>
            <%}
            %>
            <%
                if (!string.IsNullOrEmpty(Model.MessageEditPCDienThoai))
                {
            %>
            <div id="MessageEditPCDienThoai" style="font-size: 12px; color: Blue;font-weight: bold"><%=Model.MessageEditPCDienThoai%></div>
            <%
                }
            %>
            <%--end--%>
                </td>
                <td style="text-align:right" class="btn-submit">
                    <input type="button" class="button" value="Lưu" onclick="DoCreateOrEdit()" />
                    <input type="button" class="button"  value="Thêm Mới" onclick="javascript:DoNew();" />
                    <input type="button" class="button"  value="Xóa" onclick="javascript:DoDelete();" />
                    <input type="button" class="button"  value="Làm Mới" onclick="javascript:DoReset();" />
                    <input type="button" class="button"  value="Dữ liệu đã xóa" onclick="javascript:ToRecycle();" />
                </td>
            </tr>        
        </table >

     <table class="table_input" width="100%">
            <tr>
                <td nowrap="nowrap" style="width:11%">
                    <b>Tiền phụ cấp :</b>
                </td>
                <td>
                    <input style="width: 40%" type="text" onchange="javascript:onchangeChuyenSoQuaChuKhongPhaiInput(this,20,'TienChu','TienPCDienThoaiMessage');" onkeyup="javascript:onchangeChuyenSoQuaChuKhongPhaiInput(this,20,'TienChu','TienPCDienThoaiMessage');" value="<%=Model.TienPCDienThoai%>" id="TienPCDienThoai" name="TienPCDienThoai" />&nbsp;VNĐ
                    <div id="TienPCDienThoaiMessage" class="red"></div>
                        <div id="TienChu" class="red">
                    </div>
                </td>
            </tr>
            
        </table>
        <div class="pagebreak">&nbsp;</div>
        <table class="table_outsite" width="100%">
            
        <tr>
            
            <td class="first" align="right">
                <%=Html.TextBox("PCDienThoaiSearch", Model.valuesearch, new { @size = 50, @onkeypress = "if (event.keyCode==13) { return DoSearch(); }" })%>
                <img onclick="javascript:DoSearch();" style="vertical-align: middle; cursor: pointer"
                    src="<%=ResolveUrl("~/Content/Images/search_icon.gif")%>" alt="Tìm kiếm Dân tộc"
                    title="Tìm kiếm Dân tộc" />
                     <div id="SearchMessage" class="red"></div>
            </td>
        </tr>
        </table>
        <table   class="tab tab-drag">
                        <tr class="top nodrop nodrag" style="font-weight: bold">
                            <td class="first" width="20%" align="center">
                                <strong>Số thứ tự</strong>
                            </td>
                            <td class="last">
                                <strong>Số tiền</strong>
                            </td>
                        </tr>
                        <%--Danhd Muc PCDienThoai List--%>
                        <%
                                
                            IList<dm_PCDienThoai> PCDienThoaiList = Model.PCDienThoaiPagedList;
                            int t = (Model.Pagenumber - 1) * DTTB.Common.CommonVariables.PaggedItemsPerPage;
                            foreach (dm_PCDienThoai item in PCDienThoaiList)
                            {
                                t++;
                        %>
                        <tr class="item_row" onclick="javascript:highlight(this);EditPCDienThoaiAjax(<%=item.Id%>);">
                            <td class="first" align="center">
                                <%=t %>
                            </td>
                            <td align="left" class="last">
                                <%=item.TienPCDienThoai != null?item.TienPCDienThoai.Value.ToString("#,#").Replace(",",".")+ " VNĐ":"" %>&nbsp;
                            </td>
                        </tr>
                        <%}
                        %>
                        <tr class="border_bottom">
                            <%--                                <td class="first" style="background: #DDDDDD">
                                </td>--%>
                            <td class="last" colspan="3" align="right" style="background: #DDDDDD; padding-right: 10px">
                                <%
                                    PagerOptions pagerOptions = new PagerOptions();
                                    DTTB.MV2.QUANLYNHANSUTIENLUONG.BussinessDelegate.CommonDelegate.CommonDelegate CommonDelegate =
                                            new DTTB.MV2.QUANLYNHANSUTIENLUONG.BussinessDelegate.CommonDelegate.CommonDelegate();

                                    CommonDelegate.ChangeTextPaging(pagerOptions, "PageNumber");
                                         
                                %>
                                <div>
                                    <%=Html.Pager(Model.PCDienThoaiPagedList, pagerOptions, "Default1", new object())%></div>
                                <%=Html.Hidden("PageNumber", Model.Pagenumber)%>
                            </td>
                        </tr>
                        <%--dã xóa--%>
                    </table>
        
        <%-- </div>--%>
    </div>
    <%--<%Html.EndForm(); %>--%>
    </form>
</asp:Content>
